//
//  FindBikeViewController.m
//  SITABLE
//
//  Created by songjun on 16/9/9.
//  Copyright © 2016年 Sita. All rights reserved.
//

#import "FindBikeViewController.h"

@interface FindBikeViewController ()

@end

@implementation FindBikeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"车辆控制";
    
    CAGradientLayer *layer1 = [[CAGradientLayer alloc] init];
    layer1.colors = @[(__bridge id)UIColorHexRGBA(linBoardBGStartColor, 1.0).CGColor, (__bridge id)UIColorHexRGBA(linBoardBGEndColor, 1.0).CGColor];
    layer1.startPoint = CGPointMake(0, 0);
    layer1.endPoint = CGPointMake(0, 1);
    layer1.frame = self.view.bounds;
    [self.view.layer addSublayer:layer1];
    [self.view.layer insertSublayer:layer1 atIndex:0];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (IBAction)startEnginAction:(UIButton *)sender
{
    if (sender.selected) {
        sender.selected = NO;
        [sender setBackgroundImage:[UIImage imageNamed:@"startEnIv"] forState:UIControlStateNormal];
        NSLog(@"11111");
    }else{
        sender.selected = YES;
         NSLog(@"222222");
        //关机
        [sender setBackgroundImage:[UIImage imageNamed:@"endEngine"] forState:UIControlStateNormal];
    }
}

- (IBAction)lockAction:(UIButton *)sender
{
    if (sender.selected) {
        sender.selected = NO;
        NSLog(@"11111");
        [sender setBackgroundImage:[UIImage imageNamed:@"unlockIv"] forState:UIControlStateNormal];
    }else{
        sender.selected = YES;
        NSLog(@"222222");
         [sender setBackgroundImage:[UIImage imageNamed:@"lockIv"] forState:UIControlStateNormal];
    }
}

- (IBAction)findBikeAciton:(UIButton *)sender
{
    
    
}
@end
